<?php
/**
 * Created by PhpStorm.
 * Author: 芸签cms www.yunqiancms.com
 * User: sun
 * Date: 2022/8/22
 * Time: 4:16 PM
 */
namespace app\backend\modules\sys\controllers;

use app\backend\controllers\BaseController;
use app\backend\modules\sys\services\UpdateService;

class UpdateController extends BaseController
{
    public function index(){
        return view("backend.sys.update.index");
    }

    public function systemInfo(){
        $res  = (new UpdateService())->systemInfo();
        return $this->successJson('',$res);
    }

    public function log(){
        $page = request()->page ?: 1;
        $res  = (new UpdateService())->log($page);
        return $this->successJson('',$res);
    }
    public function verifyCheck(){
        $res  = (new UpdateService())->verifyCheck();
        response()->json($res)->send();
    }
    public function fileDownload(){
        $nofiles = request()->nofiles;
        $res  = (new UpdateService())->fileDownload($nofiles);
        response()->json($res)->send();
    }
}